On a day in which temperatures touched 37 degrees Celsius, players needed elaborate arrangements to relax during drinks intervals.
Peter Siddle ended the 250-run third-wicket stand by dismissing JP Duminy at the stroke of the Tea interval.
Mitchell Starc struggled with his radar on Day 3, bowling two full and getting punished by Elgar and Duminy.
Dean Elgar completed his fifth Test match century as South Africa's lead neared 300.
Jean-Paul Duminy started positively and completed his half-century not too long after Dean Elgar got to his.
Dean Elgar survived a drop when on 81 but played a steady second fiddle to JP Duminy's exuberance as South Africa's lead swelled.
Jean-Paul Duminy completed his fifth Test century after a bright start to the second session.
Dale Steyn, ruled out of the remainder of the series, was paid a visit by Kevin Pietersen ahead of the third day's play in Perth..
Dean Elgar and JP Duminy worked the singles just as efficiently as they found the boundaries..
Josh Hazlewood dismissed Dean Elgar as Australia took three wickets in the final session to stage a mini recovery.
Adam Voges dropped Quinton de Kock before the South African keeper and Vernon Philander saw off the remaining overs to take the visitors' lead towards the 400-run mark.